<div class="fadeIn">
    <br>
    <ol class="breadcrumb">
        <li class="active"><span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;<mainpage></mainpage></li>
        <li class="active">监控工作台 / 短信平台监控 / 指标监控配置</li>
    </ol>
    <div class="form-inline">
        <div class="control-group row marB15" style="margin-left: 0px">
            <div class="marT15 left marR10" >
                <span class="search-name">指标名称</span>
                <input type="text" class="form-control1" 
                ng-keyup='search($event)'
                ng-model='searchData.keyNameCn' placeholder="">
            </div>
            
            <a class=" btn btn-primary btn-sm left marT15" ng-click='search()'><span class="glyphicon glyphicon-search"></span></a>

        </div>
        </form>


      <div class="table-box">

        <table class="table table-bordered table-striped text-center bg-info">
            <thead >
            <tr class="info">
                <th class="text-center">序号</th>
                <th class="text-center">监控ID</th>
                <th class="text-center">监控名称</th>
                <th class="text-center">监控对象类型</th>
                <th class="text-center">监控对象名称</th>
                <th class="text-center">监控指标名称</th>
                <th class="text-center">指标单位</th>
                <th class="text-center">监控频率</th>
                <th class="text-center">监控表达式</th>
                <th class="text-center">责任人</th>
                <th class="text-center">手机号码</th>
                <th class="text-center">说明</th>

            </tr>
            </thead>
            <tbody>
            <tr ng-repeat='item in result'>
                <td>{{$index+1}}</td>
                <td class="w70">
                    <a  data-toggle="modal" data-target="#changes" ng-click="edit('修改',item)">{{item.triggerId}}</a>
                    
                </td>

                <td class="w85">{{item.triggerName}}</td>
                <td class="w115">{{item.objType}}</td>
                <td class="w115">{{item.itemName}}</td>
                <td class="w115">{{item.keyNameCn}}</td>
                <td class="w85">{{item.indexUnit}}</td>
                <td class="w85">{{item.quantity}}</td>
                <td class="w115">{{item.expressions}}</td>
                <td class="w70">{{item.userName}}</td>
                <td class="w85">{{item.phoneNumber}}</td>
                <td style="min-width: 200px; word-break: break-all;">{{item.indexDesc}}</td>

            </tr>
            <tr>
                <td><a class="glyphicon glyphicon-plus" data-toggle="modal" ng-click="edit('添加')" data-target="#changes"></a></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>

            </tr>

            </tbody>
        </table>
    </div>
        <page></page>
    </div>


<!-- 模态框 -->
<div class="modal fade "  tabindex="-1" id="changes" role="dialog" aria-labelledby="myLargeModalLabel">
                        <div class="modal-dialog modal-lg" role="document" style="width: 600px;">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" >{{popup}}指标监控配置</h4>
                                </div>
                                <div class="modal-body">
                                    <div class="row marT15">
                                        <div class="col-sm-6">
                                            <label class="left">监控名称：</label>
                                            <input type="text" class="form-control line4 right" 
                                            ng-model='addData.triggerName' >
                                        </div>
                                        <div class="col-sm-6">
                                            <label class="search-name left">对象类型</label>
                                            <select class="form-control line4 right" 
                                            ng-model='addData.objType'
                                            ng-change='childObjType()'
                                            ng-disabled='isEdit' 
                                            ng-options='item.DICID as item.DICVALUENAME for item in objType'
                                            >                                           
                                            </select>
                                        </div>
                                        
                                    </div>
                                    <div class="row marT15">
                                        <div class="col-sm-6">
                                            <label class="left">监控对象：</label>
                                            <select class="form-control line4 right" 
                                            ng-model='addData.objId'
                                            ng-options='item.objId as item.objName for item in objList'
                                            ng-disabled='isEdit' 
                                            ng-change='getKeyName()'>
                                               
                                            </select>
                                        </div>
                                        <div class="col-sm-6">
                                            <label class="left">子对象名称：</label>
                                            <select class="form-control right line4"
                                            ng-model='addData.itemId'
                                            ng-options='item.itemId as item.itemName for item in keyNameList'
                                            ng-change='getIndexUnit()'
                                            ng-disabled='isEdit'
                                            >
                                            
                                            </select>
                                        </div>                                       
                                        
                                    </div>
                                    <div class="row marT15">
                                        <div class="col-sm-6">
                                            <label class="left">指标名称：</label>
                                            <select class="form-control
                                             line4 right"
                                             ng-model='addData.keyId'
                                             ng-options='item.keyId as item.keyName for item in indexUnitList'
                                             ng-change='changeIndexUnit()'
                                             ng-disabled='isEdit' 
                                             >
                                           
                                            </select>
                                        </div>
                                         <div class="col-sm-6">
                                            <label class="left">指标单位：</label>
                                            <input type="text" class="form-control line4 right" 
                                            ng-model='addData.indexUnit'
                                            disabled="disabled" 
                                            placeholder="">
                                        </div>
                                        
                                        
                                    </div>
                                    <div class="row marT15">
                                        <div class="col-sm-6 lineH25">
                                            <label class="left">监控频率：</label>
                                            <label class="right marL10">秒</label>
                                            <input type="text" class="form-control line4 right" 
                                            style="width:128px;" 
                                            ng-model='addData.quantity'
                                            disabled="disabled" 
                                            onkeyup="this.value=this.value.replace(/\D/,'')"
                                            oninput='if(value.length>6)value=""' 
                                            >
                                            
                                        </div>
                                        <div class="col-sm-6 lineH25">
                                            <label class="left">持续：</label>
                                            <label class='right marL10'>分钟预警</label>
                                            <input type="text" class="form-control right line4" style="width: 92px;"
                                            ng-model='addData.sustainTime'
                                            onkeyup="this.value=this.value.replace(/\D/,'')"
                                            oninput='if(value.length>6)value=""' 
                                            >
                                            
                                        </div>
                                    </div>
                                    <div class="row marT15">
                                       
                                        <div class="col-sm-12">
                                            <p><label>监控表达式：</label></p>
                                            <textarea class="form-control" 
                                            ng-model='addData.expressions'></textarea>
                                        </div>
                                        
                                    </div>
                                    <div class="row marT15">
                                        <div class="col-sm-12">
                                            <p><label>监控说明：</label></p>
                                            <textarea class="form-control" 
                                            ng-model='addData.indexDesc'></textarea>
                                        </div>
                                    </div>
                                   <div class="row marT15">
                                       <div class="col-sm-12">
                                           <p style="color: red">
                                               注意：监控对象，对象名称，指标名称是级联关系,指标单位为必选项
                                           </p>
                                       </div>
                                   </div>
                                   <!--  <table class="table table-bordered table-striped text-center bg-success">
                                        <thead >
                                        <tr class="bg-success">
                                            <th class="text-center">序号</th>
                                            <th class="text-center">预警接收人</th>
                                            <th class="text-center">手机</th>
                                            <th class="text-center">邮箱</th>
                                            <th class="text-center">人员类型</th>
                                            <th class="text-center">接收预警等级</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr>
                                            <td>1</td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td>
                                                <select class="form-control">
                                                    <option >责任人</option>
                                                    <option >关注人</option>
                                                </select>
                                            </td>
                                            <td>
                                                <label class="checkbox-inline">
                                                    <input type="checkbox" id="inlineCheckbox4" value="option1"> 1级
                                                </label>
                                                <label class="checkbox-inline">
                                                    <input type="checkbox" id="inlineCheckbox5" value="option2"> 2级
                                                </label>
                                                <label class="checkbox-inline">
                                                    <input type="checkbox" id="inlineCheckbox6" value="option3"> 3级
                                                </label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>2</td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td>

                                            </td>
                                            <td>

                                            </td>
                                        </tr>
                                        </tbody>
                                    </table> -->

                                    <br>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                    <button type="button" class="btn btn-primary" ng-click='editSave()'>保存</button>
                                </div>
                            </div>

                        </div>
 </div>
<!-- 加载框 -->
  <span class='loaded' ng-show='loaded'><img  src="img/load.gif"></span>
<!-- 加载框 完成-->

